package cn.itcast.order;

import cn.itcast.fegin.Feign.UserCilent;
import cn.itcast.fegin.config.DefultFeginConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

@MapperScan("cn.itcast.order.mapper")
@SpringBootApplication
@EnableFeignClients(clients = {UserCilent.class},defaultConfiguration = DefultFeginConfig.class) //clients指定客户端
//@EnableFeignClients(defaultConfiguration = DefultFeginConfig.class)
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

//    @Bean
//    @LoadBalanced //负载均衡
//    public RestTemplate restTemplate(){
//        return new  RestTemplate();
//    }

//    @Bean
//    //随机规则,作用全局
//    public IRule randomRule(){
//        return new RandomRule();
//    }
}